package com.job.model;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.sql.Time;

/**
 * 站内消息类
 * @author hasee
 */
@Entity()
@Table()
public class Message {
    /**
     * 消息id
     */
    private int messageId;
    /**
     * 消息接收者ID
     */
    private int messageToId;
    /**
     * 类别id 用来区分用户0 管理者3 用人单位2
     */
    private int messageToSortId;
    /**
     * 消息发送者id
     */
    private int messageSenId;
    /**
     * 类别id 用来区分用户0 管理者3 用人单位2
     */
    private int messageSenSortId;
    /**
     * 消息创建时间
     */
    private Time messageCreateTime;
    /**
     * 消息是否已经被读
     */
    private Boolean messageRead;
    /**
     * 消息体
     */
    private String messageText;

    @Id
    @GeneratedValue(generator="increment")
    @GenericGenerator(name="increment", strategy = "increment")
    public int getMessageId() {
        return messageId;
    }

    public void setMessageId(int messageId) {
        this.messageId = messageId;
    }

    public int getMessageToId() {
        return messageToId;
    }

    public void setMessageToId(int messageToId) {
        this.messageToId = messageToId;
    }

    public int getMessageSenId() {
        return messageSenId;
    }

    public void setMessageSenId(int messageSenId) {
        this.messageSenId = messageSenId;
    }

    public Time getMessageCreateTime() {
        return messageCreateTime;
    }

    public void setMessageCreateTime(Time messageCreateTime) {
        this.messageCreateTime = messageCreateTime;
    }

    public Boolean getMessageRead() {
        return messageRead;
    }

    public void setMessageRead(Boolean messageRead) {
        this.messageRead = messageRead;
    }

    public String getMessageText() {
        return messageText;
    }

    public void setMessageText(String messageText) {
        this.messageText = messageText;
    }

    public int getMessageToSortId() {
        return messageToSortId;
    }

    public void setMessageToSortId(int messageToSortId) {
        this.messageToSortId = messageToSortId;
    }

    public int getMessageSenSortId() {
        return messageSenSortId;
    }

    public void setMessageSenSortId(int messageSenSortId) {
        this.messageSenSortId = messageSenSortId;
    }
}
